import AccountSecurityIndex from './accountSecurityIndex'
import AccountSecurityList from './accountSecurityList'

const accountSecurityRouter = {

  path: 'system/securityIndex',
  getChildRoutes(nextState, cb) {
    require.ensure([], (require) => {
      cb(null, [
        {
          path: 'list',
          getComponents(nextState, cb) {
            require.ensure([], function (require) {
              cb(null, AccountSecurityList)
            })
          },

        }
      ])
    })
  },
  indexRoute: {
    getComponents(location, cb) {
      require.ensure([], function (require) {
        cb(null, AccountSecurityList)
      })
      return cb()
    }
  },

  getComponents(nextState, cb) {
    require.ensure([], (require) => {
      cb(null, AccountSecurityIndex)
    })
  }
}

export default accountSecurityRouter;

